home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-21 | 1.9 KB | 53 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWPriMem.h
- // Release Version: $ 1.0d1 $
- //
- // Creation Date: 3/25/94
- //
- // Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWPRIMEM_H
- #define FWPRIMEM_H
-
- #include <stddef.h>
-
- //----------------------------------------------------------------------------------------
- // Primitive Memory Operations
- //
- // These functions provide a platform-independent interface to low level operating
- // system services for memory management. The functions impose minimal requirements
- // on the underlying environment, and are built in the simplest way on top of native
- // operating system APIs.
- //
- // Memory blocks allocated and freed by these functions can be as large as can be
- // requested with a size_t parameter, but these routines should generally not be
- // used for large allocations.
- //
- // This function are intended for use by very low-level code. Applications (and most
- // of OPF) should use higher level interfaces.
- //
- //----------------------------------------------------------------------------------------
-
- void *FW_PrimitiveAllocateBlock(size_t bytesRequested);
- // Returns 0 if request could not be satisfied.
-
- void *FW_PrimitiveResizeBlock(void *block, size_t bytesRequested);
- // The block may be moved to satisfy request.
- // Returns 0 if request could not be satisfied.
- // Resize of NULL or invalid block is undefined (platform-dependent).
-
- void FW_PrimitiveFreeBlock(void *block);
- // Free of invalid block is undefined (platform-dependent).
- // It is a no-op to try to free NULL.
-
- size_t FW_PrimitiveGetBlockSize(void* p);
- // Returns size in bytes.
- // Size of NULL or invalid block is undefined (platform-dependent).
-
- void FW_PrimitiveCopyMemory(const void *source, void *destination, size_t bytes);
- // No error detection provided
-
- #endif